<?php
  class tag extends model {
   function view(){ 
           
          $arraynewdata= $this->getdefault();
          

       //   echo "<pre>";
//          print_r($_SERVER['REQUEST_URI']['/tag/']);
//          echo "</pre>;";
          list($t,$tagname)=explode('/tag/',$_SERVER['REQUEST_URI']) ;
      //    exit;
          if($tagname)
          {
          $seachtext= urldecode(str_replace("%20",' ',$tagname)) ;
          $arraynewdata['tagsearch']=$seachtext;

          
          $tagdata=$this->gettagidbytagname($seachtext);
       
          $arraynewdata['tagid'][]=$tagdata;
          
       
          
          

          $this->loadtemplate('submain',$arraynewdata);  
          }
          
           }
  }
?>
